<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>朋友圈表管理</title>
<meta
	content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'
	name='viewport'>
<jsp:include page="../com/header.jsp"></jsp:include>
<script type="text/javascript" src="../../js/comm/listcomm.js"></script>
<script type="text/javascript">
        var contentUrl = root + "cms/moments/findMomentsNEStatusPage";
       
        var operateUrl = root + 'cms/moments/operateMomentsByIds';
        function getfilter(){
            var _jsonFilter = "{";
            if($("#search_userId").val() && $("#search_userId").val().length > 0){
				_jsonFilter += "'search_LIKE_userName':'"+$("#search_userId").val().replace("'","\"")+"',";
			}
            if($("#search_Moments_Content").val() && $("#search_Moments_Content").val().length > 0){
                _jsonFilter += "'search_LIKE_content':'"+$("#search_Moments_Content").val().replace("'","\"")+"',";
            }
            if(_jsonFilter != "{"){
                _jsonFilter = _jsonFilter.substring(0,_jsonFilter.length - 1);
            }
            _jsonFilter += "}";
            return _jsonFilter;
        }
    </script>

</head>
<body>
	<section>
		<div>
			<div class="col-xs-12">
				<div class="box">
					<form id="search_form" class="form-horizontal">
						<div class="tabSelect" id="selectHeadId">
							<br>
							<div class="form-group  col-md-3 search-form">
								<label class="col-md-4 control-label controls"
									for="">用户名：</label>
								<div class="col-md-8">
									<input type="text" placeholder="用户名"
										class="form-control input-sm" id="search_userId"
										name="userName" />
								</div>
							</div>
							<div class="form-group  col-md-3 search-form">
								<label class="col-md-4 control-label controls"
									for="">朋友圈内容：</label>
								<div class="col-md-8">
									<input type="text" placeholder="朋友圈"
										class="form-control input-sm" id="search_Moments_Content"
										name="content" />
								</div>
							</div>
							<input type="button" value="查询" id="search"
								class="btn btn-primary searchBtn">
						</div>
					</form>
					<div class="box-body table-responsive" style="clear: both;">
						<!-- <input type="button" value="详细" id="momentsDetail" class="btn btn-color">  --> 
						<input type="button" value="删除" id="deleteSome" class="btn btn-danger">
					</div>
					<div class="box-body table-responsive">
						<table id="example2" class="table table-bordered table-hover">
							<thead>
								<tr>
									<th width="30"><input type="checkbox" id="_selectAll" /></th>
									<th width="80">用户名</th>
									<th width="80">朋友圈内容</th>
									<th width="80">朋友圈图片</th>
									<th width="80">发表时间</th>
								</tr>
							</thead>
							<!-- 表格内容 start -->
							<tbody id="mycontent"></tbody>
							<!-- 表格内容 end -->
						</table>
						<!-- 分页标签 start -->
						<div class="row page_big_div" id="displayPage"></div>
						<!-- 分页标签 end -->
						<script id="tableContentTmple" type="text/x-jsrender">
								<tr>
									<td><input id="ck_{{:id}}" ckId="{{:id}}" ckStatus="{{:status}}" class="ckSelect" type="checkbox" /></td>
									<td>{{:userName}}</td>
									<td title={{:content}} style="vertical-align:middle; text-align:left;">{{subStrings:content lens=15}}</td>
									<td>
										<%--photos是用逗号间隔的字符串--%>
										{{if photos}}
											{{for photos.split(",")}}
												 <img layer-src="../../{{:}}" layer-pid="" src="../../{{:}}" alt="" layer-index="0" height="40" width="50">
											{{/for}}
										{{else}}
										{{/if}}
									</td>
									<td>{{:createTime}}</td>
								</tr>
						  </script>
					</div>
				</div>
			</div>
	</section>


	<!-- 详细信息dialog start -->
	<div class="modal fade" id="myModals" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<form id="validateForm" class="form-horizontal">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" id="closeFeedBack" class="close"
							data-dismiss="modal" aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">朋友圈详细内容</h4>
					</div>
					<div class="modal-body">
						<table id="momentsDetailTable">
						</table>
						<script id="momentsDetailTmpl" type="text/x-jsrender">
							
                        <tbody>
							{{if type==1}}
									<td>点赞</td>
									<td>:{{:mUserName}}</td>		
							{{else}}
								<tr>
									{{if replyToUserName}}	
										<td>
											{{:mUserName}}&nbsp;回复
										</td>
										<td>
											:&nbsp;{{:replyContent}}	
										</td>								
									{{else}}
									
										<td>
											{{:mUserName}}&nbsp;
										</td>
										<td>
											:&nbsp;{{:replyContent}}
										</td>		
									{{/if}}	
								</tr>
							{{/if}}
							
                           
                        </tbody>
                        </script>
					</div>
				</div>
			</div>
		</form>
	</div>
	<!-- 详细信息dialog end -->

</body>
</html>